import request from '@/Util/request.js'

const prefix = '/api/app/login'


const AuthPhone = (code) => {
	return request({
		url: prefix + '/AuthPhone/' + code,
		method: 'post',
	})
}

/**
 * 登录
 * @returns
 */
const login = (code) => {
	return request({
		url: prefix + '/login',
		method: 'get',
		params: {
			code
		}
	})
}

/**
 * 注册
 * @returns
 */
const sign = (data) => {
	return request({
		url: prefix + '/sign',
		method: 'post',
		data
	})
}


const userInfo = () => {
	return request({
		url: prefix + '/userInfo',
		method: 'get'
	})
}


export default {
	login,
	sign,
	userInfo ,
	AuthPhone
}